import { request } from "./request";

export function getLineMachine() {
  return request({
    url: "/FactoryInfo/LineMachines",
  });
}
// 新增线体
export function addLineData(data) {
  return request({
    url: "/FactoryInfo/LineMachines/Line",
    method: "post",
    data: data,
  });
}
//删除线体
export function deleteLineData(params) {
  return request({
    url: `/FactoryInfo/LineMachines/Line/${params.id}`,
    method: "delete",
  });
}
//更新线体
export function updateLineData(data) {
  return request({
    url: "/FactoryInfo/LineMachines/Line",
    method: "put",
    data: data,
  });
}
//删除机器
export function deleteMachineData(params) {
  return request({
    url: `/FactoryInfo/LineMachines/Machine/${params.id}`,
    method: "delete",
  });
}
//更新机器
export function updateMachineData(data) {
  return request({
    url: "/FactoryInfo/LineMachines/Machine",
    method: "put",
    data: data,
  });
}
//新增机器
export function addMachineData(data) {
  return request({
    url: "/FactoryInfo/LineMachines/Machine",
    method: "post",
    data: data,
  });
}
//设备类型获取
export function FeachGetEquipTypes() {
  return request({
    url: "/FactoryInfo/EquipTypes",
  });
}

/** AHCSNC抓取 */ 

export function FeachGetAHCSNCType(params) {
  return request({
    url: `SystemCfg/AHCSNC/${params.AHCSNCType}/Grab/RunningStatus`,
  });
}

export function FeachAHCSNCConfig(data, AHCSNCType) {
  return request({
    url: `/SystemCfg/AHCSNC/${AHCSNCType}/Grab/Cfg`,
    data: data,
    method: "post",
  });
}

export function FeachAHCSNCFtpPathAdd(data, AHCSNCType) {
  return request({
    url: `/SystemCfg/AHCSNC/${AHCSNCType}/Grab/ftpPath`,
    data: data,
    method: "post",
  });
}

export function FeachAHCSNCFtpPathUpdate(data, AHCSNCType) {
  return request({
    url: `/SystemCfg/AHCSNC/${AHCSNCType}/Grab/ftpPath`,
    data: data,
    method: "put",
  });
}

export function FeachAHCSNCFtpPathDel(data, AHCSNCType) {
  return request({
    url: `/SystemCfg/AHCSNC/${AHCSNCType}/Grab/ftpPath`,
    data: data,
    method: "delete",
  });
}

export function FeachAHCSNCFtpPathRsetProgress(data, AHCSNCType) {
  return request({
    url: `/SystemCfg/AHCSNC/${AHCSNCType}/Grab/ftpPath/RsetProgress`,
    data: data,
    method: "put",
  });
}
/** AHCSNC抓取 */ 

/** Fujidb抓取 */

export function FeachGetFujidbType() {
    return request({
        url: `SystemCfg/Fujidb/Grab/RunningStatus`,
    });
}

export function FeachFujidbConfig(data) {
    return request({
        url: `/SystemCfg/Fujidb/Grab/Cfg`,
        data: data,
        method: "post",
    });
}

export function FeachFujidbDBInfoAdd(data) {
    return request({
        url: `/SystemCfg/Fujidb/Grab/DBInfo`,
        data: data,
        method: "post",
    });
}

export function FeachFujidbDBInfoUpdate(data) {
    return request({
        url: `/SystemCfg/Fujidb/Grab/DBInfo`,
        data: data,
        method: "put",
    });
}

export function FeachFujidbDBInfoDel(id) {
    return request({
        url: `/SystemCfg/Fujidb/Grab/DBInfo/${id}`,
        method: "delete",
    });
}
/** Fujidb抓取 */ 